//
//  main.m
//  MACTool
//
//  Created by hle1 on 2021/6/19.
//

#import <Foundation/Foundation.h>
#import <objc/runtime.h>
#import <malloc/malloc.h>

//union derictor{
//    Byte left;
//    Byte right;
//    Byte top;
//    Byte bottom;
//};

//void test(){
//    static int a = 10;
//    a++;
//    NSLog(@"=========%d",a);
//
//}

//@interface SHKTest : NSObject
//- (void)songhongkang;
//@property(nonatomic, assign) NSInteger name;
//@end
////
//@implementation SHKTest
//+ (void)initialize
//{
//    NSLog(@"SHKTest initialize");
//}
//@end
//
//@interface SHKTest (Test)
////- (void)songhongkang_Test;
//@end
//
//@implementation SHKTest (Test)
//+ (void)initialize
//{
//    NSLog(@"SHKTest (Test) initialize");
//}
//@end

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        int age = 10;
        static int age1 = 11l;
        void (^block)(void) = ^() {
            NSLog(@"=========%d,%d",age,age1);
            NSLog(@"=========");
        };
        NSLog(@"=========%@",block);
        
//        NSLog(@"block:%p",block);
//        NSLog(@"&block:%p",&block);
//
//        NSLog(@"block.class = %@",[block class]);
//
//        NSLog(@"sizeof:=========%zd",sizeof(SHKTest.class));
//        NSLog(@"class_getInstanceSize:=========%zd",class_getInstanceSize(SHKTest.class));
//        NSLog(@"malloc_size:=========%zd",malloc_size((__bridge const void *)(block)));
//        block();
//        sel_registerName("init")
//        @selector(init);
//        [SHKTest alloc];
//        SHKTest *test = [[SHKTest alloc] init];
//        [test setValue:@10 forKey:@"_age"];
//        NSLog(@"=========");
//        NSLog(@"=========%d",test.age);
        
//        SHKTest *test = [[SHKTest alloc] init];
//        [test test];
//        [test addObserver:self forKeyPath:@"age" options:NSKeyValueObservingOptionNew context:nil];
//
        
//        static int a = 10;
//        int b = 10;
        
//        NSString *cellId = @"12312312312";
        
//        NSLog(@"=========");
//        for (int i = 0; i < 10; i++) {
//            test();
//        }


//        NSLog(@"=========");
//
//        a = 100;
//
//        NSLog(@"=========");
        
//        class int b = 20;
        
//        union derictor a;
//        a.left = 1;
//        a.right = 2;
//        a.top = 3;
//        a.bottom = 4;
        
//        int a =   sizeof(unsigned short);
//        int b =   sizeof(unsigned long);
//        int c =   sizeof(unsigned int);
//
//
//        NSLog(@"=========");
//
//        NSLog(@"=========");
        
//        NSLog(@"%d",sizeof(a));
        // insert code here...
//        int num = 10;
//        int *address = &num;
//        int a  =  *address;
        
//        NSLog(@"=========");
        
//        int *a = 10;
//        NSLog(@"%p",a);
//        NSObject *obj = [[NSObject alloc] init];
//
//        &obj
//        NSLog(@"=========");
        
//        obj
//
//        *obj
//
//        &obj
        
    }
    return 0;
}
